<!doctype html>
<html lang="en">

	<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>Bitter Mobile Template</title>
		<link rel="stylesheet" href="assets/css/style.css">
		<meta name="viewport" content="initial-scale=1, maximum-scale=1, width=device-width">
		<meta name="description" content="Bitter Mobile Template">
		<meta name="keywords" content="bootstrap, mobile template, cordova, phonegap, mobile, html, responsive" />
	</head>

	<body>

		<!-- Page loading -->
		<div class="loading">
			<div class="spinner-grow"></div>
		</div>
		<!-- * Page loading -->

		<!-- App Header -->
		<div class="appHeader">
			<div class="left">
				<a href="javascript:;" class="icon goBack">
					<i class="icon ion-ios-arrow-back"></i>
				</a>
			</div>
			<div class="pageTitle">注册</div>
			<div class="right">
				<a href="people-login.html" class="link">登录</a>
			</div>
		</div>
		<!-- searchBox -->
		<div class="searchBox">
			<form>
				<span class="inputIcon">
					<i class="icon ion-ios-search"></i>
				</span>
				<input type="text" class="form-control" id="searchInput" placeholder="Search...">
				<a href="javascript:;" class="toggleSearchbox closeButton">
					<i class="icon ion-ios-close-circle"></i>
				</a>
			</form>
		</div>
		<!-- * searchBox -->
		<!-- * App Header -->

		<!-- App Capsule -->
		<div id="appCapsule" class="pb-2">

			<div class="appContent pb-0">

				<img src="assets/img/sample/draw-2.png" alt="img" class="img-fluid mt-3 mb-3">

				<div class="sectionTitle text-center">
					<div class="title">
						<h1>快来加入我们!</h1>
					</div>
					<div class="lead mb-3">注册新用户</div>
				</div>

				<form action="index.html">
					<div class="form-group">
						<input type="text" class="form-control" id="phone" placeholder="手机号">
					</div>
					<div class="form-group">
						<input type="password" class="form-control" id="password" placeholder="密码">
					</div>
					<div class="form-group">
						<div class="row">
							<div class="col-6">
								<input type="text" class="form-control" id="vcode" placeholder="验证码">
							</div>
							<div class="col-6">
								<button class="form-control btn-twitter">获取验证码</button>
							</div>
						</div>
					</div>
					<div class="form-group">
						<button type="button" onclick="register()" class="btn btn-facebook btn-block">
							注册
						</button>
						<script>
							function register(){
								var PostStringToRear = function(url_suffix, raw_data, success_function) {
											let jqxhr = $.post('http://47.95.220.161:8080'+url_suffix, raw_data, success_function).fail(function (xhr, status) {
													console.log('失败: ' + xhr.status + ', 原因: ' + status);
												});
											return jqxhr;
									}
								let search_url_suffix = '/users/signin';
												let search_data = {
													"userNa":"1",
													"password":document.getElementById('password').value,
													"phone":document.getElementById('phone').value,
													"userImg":"3",
													"QQNum":"1",
													"WeChatNum":"1",
													"sex":"0"
													};
												let search_success = function(data) {
													window.location.href = "people-register.html"; 
													console.log('成功, 收到的数据: ' + JSON.stringify(data));
												};
												PostStringToRear(search_url_suffix, search_data, search_success);
								};
						</script>
					</div>
				</form>
			</div>
		</div>
		<!-- appCapsule -->


		<!-- ///////////// Js Files ////////////////////  -->
		<!-- Jquery -->
		<script src="assets/js/lib/jquery-3.4.1.min.js"></script>
		<!-- Bootstrap-->
		<script src="assets/js/lib/popper.min.js"></script>
		<script src="assets/js/lib/bootstrap.min.js"></script>
		<!-- Owl Carousel -->
		<script src="assets/js/plugins/owl.carousel.min.js"></script>
		<!-- Main Js File -->
		<script src="assets/js/app.js"></script>

	</body>

</html>
